import React, { Component } from 'react'
import Timer from './components/Timer';

export default class App extends Component {
    state = {
        flag: true
    }
    render() {
        let {flag} = this.state;
        return (
            <div>
                <h3>App</h3>
                <button onClick={()=>{
                    this.setState({
                        flag:!flag
                    })
                }}>切换flag</button>
               
               {flag && <Timer/>}
            </div>
        )
    }
}
